using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;

[RequireComponent(typeof(RectTransform))]
public class ButtonExpand : Button, IPointerDownHandler, IPointerUpHandler
{
    public UnityEvent<PointerEventData> onPointerDown
    {
        get { return m_OnPointerDown; }
    }
    public UnityEvent<PointerEventData> onPointerUp
    {
        get { return m_OnPointerUp; }
    }
    [SerializeField]
    private UnityEvent<PointerEventData> m_OnPointerDown = new UnityEvent<PointerEventData>();
    [SerializeField]
    private UnityEvent<PointerEventData> m_OnPointerUp = new UnityEvent<PointerEventData>();
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }


    public void OnPointerDown(PointerEventData eventData)
    {
        m_OnPointerDown.Invoke(eventData);
    }

    public void OnPointerUp(PointerEventData eventData)
    {
        m_OnPointerUp.Invoke(eventData);
    }
}
